cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(NanoTrack_Cpp)

set(RKNN_RT_LIB /userdata/rknpu2/runtime/RK3588/Linux/librknn_api/aarch64/librknnrt.so)
set(RGA_LIB /userdata/rknpu2/examples/3rdparty/rga/RK3588/lib/Linux/aarch64/librga.so)

find_package( OpenCV REQUIRED )
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(include)
include_directories(/home/linaro/tracking/rknpu2/runtime/RK3588/Linux/librknn_api/include)
include_directories(/home/linaro/tracking/rknpu2/examples/3rdparty/rga/RK3588/include)
include_directories(${PROJECT_SOURCE_DIR}/3rd-party/camera_rga/include)

add_subdirectory(${PROJECT_SOURCE_DIR}/3rd-party/camera_rga)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")

add_executable(NanoTrack_Cpp src/rknn.cc src/nanotrack.cpp src/main.cpp)
target_link_libraries(NanoTrack_Cpp "${OpenCV_LIBS}" ${RKNN_RT_LIB} ${RGA_LIB} camera gomp pthread)
set_property(TARGET NanoTrack_Cpp PROPERTY CXX_STANDARD 14)
